#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int N = 110;

ll k;
int main() {
#ifdef LOCAL
    freopen("in.txt", "r", stdin);
    freopen("out.txt", "w", stdout);
#endif
    cin >> k;
    string res;

    while(k) {
        if (k&1) res += '2';
        else res += '0';
        k>>=1;
    }
    reverse(res.begin(), res.end());
    cout << res << endl;
    return 0;
}

//220022020000202020002022022000002020002222002200002022002200
//220022020000202020002022022000002020002222002200002022002200